<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<html>
<head>
	<title>综合演示用例</title>
	
	<!-- 新 Bootstrap 核心 CSS 文件 -->
	<link rel="stylesheet" href="//cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css">
	
	<!-- 可选的Bootstrap主题文件（一般不用引入） -->
	<link rel="stylesheet" href="//cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap-theme.min.css">
	
	<!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
	<script src="//cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script>
	
	<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
	<script src="//cdn.bootcss.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
	
	<!-- FancyBox 文件 -->
<!-- Add mousewheel plugin (this is optional) -->
<script type="text/javascript" src="${ctx}/static/fancybox/lib/jquery.mousewheel-3.0.6.pack.js"></script>

<!-- Add fancyBox -->
<link rel="stylesheet" href="${ctx}/static/fancybox/source/jquery.fancybox.css?v=2.1.5" type="text/css" media="screen" />
<script type="text/javascript" src="${ctx}/static/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>

<!-- Optionally add helpers - button, thumbnail and/or media -->
<link rel="stylesheet" href="${ctx}/static/fancybox/source/helpers/jquery.fancybox-buttons.css?v=1.0.5" type="text/css" media="screen" />
<script type="text/javascript" src="${ctx}/static/fancybox/source/helpers/jquery.fancybox-buttons.js?v=1.0.5"></script>
<script type="text/javascript" src="${ctx}/static/fancybox/source/helpers/jquery.fancybox-media.js?v=1.0.6"></script>

<link rel="stylesheet" href="${ctx}/static/fancybox/source/helpers/jquery.fancybox-thumbs.css?v=1.0.7" type="text/css" media="screen" />
<script type="text/javascript" src="${ctx}/static/fancybox/source/helpers/jquery.fancybox-thumbs.js?v=1.0.7"></script>


<script type="text/javascript">
$(".various").fancybox({
	maxWidth	: 1600,
	maxHeight	: 1200,
	fitToView	: false,
	width		: '70%',
	height		: '70%',
	autoSize	: false,
	closeClick	: false,
	openEffect	: 'none',
	closeEffect	: 'none'
});
</script>
</head>

<body>
<div class="container" style="width: 99%">
<h2>城市代言家后台统计</h2>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
		<tr>
			<th>参与总人次：（就是点击进去的次数）</th>
			<th>参与总人数：（报名+投票总人数）</th>
			<th>领奖人数：（填写领奖信息的用户）</th>
		</tr>
		</thead>
		<tbody>
			<tr>
				<td>${totalCount}&nbsp;</td>
				<td>${totalForCanyu}&nbsp;</td>
				<td>${totalForReceivePrize}&nbsp;</td>
			</tr>
		</tbody>		
	</table>
	
	<ul class="nav nav-tabs">
	  <li role="presentation" class="active"><a href="${ctx}/admin/search_1">报名列表</a></li>
	  <li role="presentation"><a href="${ctx}/admin/search_2">投票列表</a></li>
	</ul>
        <h3>报名列表（报名的+既报名又投票的） 报名人数：${applyCount}</h3>
        <table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
		<tr>
			<th>序号</th>
			<th>票数</th>
			<th>姓名</th>
			<th>电话</th>
			<th>奖品</th>
			<th>是否想买房</th>
			<th>是否业主</th>
			<th>家庭故事</th>
			<th>家庭照片</th>
			<th>爱二十四城的理由</th>
			<th>未来的期待和建议</th>
			<th>亲友会购买吗</th>
			<th>印象</th>
			<th>期望</th>
			<th>意愿</th>
			<th>报名日期</th>
		</tr>
		</thead>
		<tbody>
		<c:forEach items="${list}" var="user" varStatus="indexStatus">
			<tr>
				<td>${user.id}&nbsp;</td>
				<td>${user.firstTickets}&nbsp;</td>
				<td>${user.name}&nbsp;</td>
				<td>${user.phone}&nbsp;</td>
				<td>${user.prize}&nbsp;</td>
				<td>${user.buy}&nbsp;</td>
				<td>${user.owner}&nbsp;</td>
				<td width="360px">${user.introduction}&nbsp;</td>
				<td>
				<a  class="various fancybox.ajax" data-fancybox-type="ajax"  href="${ctx}/admin/images/${user.uid}" title="通过Ajax加载的内容">点击查看图片</a>
				</td>
				
				<td>${user.liyou}&nbsp;</td>
				<td>${user.jianyi}&nbsp;</td>
				<td>${user.paycity}&nbsp;</td>
				<td>${user.yinxiang}&nbsp;</td>
				<td>${user.qiwang}&nbsp;</td>
				<td>${user.yiyuan}&nbsp;</td>
				<td><fmt:formatDate value="${user.createDate}" pattern="yyyy-MM-dd HH:mm:ss" />&nbsp;</td>
			</tr>
		</c:forEach>
		</tbody>		
	</table>
      </div>
	
	
</body>
</html>
